<!--
  Generated template for the MessagePage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar no-border>
      <button ion-button menuToggle>
          <ion-icon name="menu"></ion-icon>
      </button>
    <ion-title>新闻消息</ion-title>
  </ion-navbar>

</ion-header>

<ion-content class="ion-content-background-partingline" no-padding>

    <ion-refresher (ionRefresh)="doRefresh($event)">
        <ion-refresher-content pullingText="下拉刷新"></ion-refresher-content>
    </ion-refresher>

    <ion-list >

      <ion-item-sliding *ngFor="let message of newsList" #slidingItem [attr.type]="common">
        <ion-item item-text-wrap (click)="test(message.url)">
          <h3>{{message.title}}</h3>
          <p> {{message.time}} </p>
        </ion-item>

        <ion-item-options>
          <button ion-button color="danger" (click)="test(message.url)">
            查看
          </button>
        </ion-item-options>
      </ion-item-sliding>
      <ion-allitem-showed-bottom *ngIf="newsList.length>=total&&newsList.length>0"></ion-allitem-showed-bottom>
      <ion-custom-empty *ngIf="total==0"></ion-custom-empty>
    </ion-list>

    <!-- <ion-infinite-scroll *ngIf="messages.length<total" (ionInfinite)="doInfinite($event)">
        <ion-infinite-scroll-content loadingText="正在加载..."></ion-infinite-scroll-content>
    </ion-infinite-scroll> -->

</ion-content>
